# 导入APIRouter
from app.service.langchain_logic import process_langchain_data

from fastapi import APIRouter

app = APIRouter(tags=["狗蛋儿演示"])


@app.get(path='/langchain', summary="狗蛋儿AI查询接口")
def langchain_endpoint(question: str):
    """
    以下为问题示例：

    - **1.Query ability**   :

                                 which user's phone number is 13757136095,what's he delflag  and emp_no and tenantId?
    - **2.Statistical ability**   :

                                 how many students are there
    - **3.Reasoning ability**   :

                                which student is best？
    """
    # 从请求中获取数据

    # 调用业务逻辑处理数据
    result = process_langchain_data(question)

    # 返回响应
    return result
